<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>

<script>
    const url = 'bb'
    switch (true) {
        case url === 'aaa':
            console.log('aaa')
            break;
        case url === 'bbb':
            console.log('bbb')
            break;
        case url.indexOf('bb') !== -1:
            console.log('bb')
            break;
        default:
            console.log('哦豁，完蛋')
            break;
    }
</script>
